﻿
Imports elpmis.variablefinder_ext_t

Namespace variablefinder_ext_t
    Public Class methodInfo_finder_t
        Inherits t_finder(Of Reflection.MethodInfo)
    End Class

    Public Class pointer_finder_t(Of T)
        Inherits t_finder(Of pointer(Of T))

        Private Shared _f As pointer_finder_t(Of T) = Nothing

        Public Shared Function finder_s() As pointer_finder_t(Of T)
            If _f Is Nothing Then
                _f = New pointer_finder_t(Of T)()
            End If
            Return _f
        End Function
    End Class
End Namespace

Public Module _variablefinder_ext
    Private _methodInfo_finder As methodInfo_finder_t = Nothing

    Public Function methodInfo_finder() As methodInfo_finder_t
        Return _methodInfo_finder
    End Function

    Public Function pointer_finder(Of T)() As pointer_finder_t(Of T)
        Return pointer_finder_t(Of T).finder_s()
    End Function

    Sub New()
        _methodInfo_finder = New methodInfo_finder_t()
    End Sub
End Module